package models;
import java.util.ArrayList;
import java.util.List;

import commands.INSSCommand;
import commands.ImpostoRendaCommand;
import commands.PericulosidadeCommand;
import commands.SalarioCommand;

public class Folha {

	private static List<SalarioCommand> commands;

	static {
		commands = new ArrayList<SalarioCommand>();
		commands.add( new INSSCommand() );
		commands.add( new ImpostoRendaCommand() );
		commands.add( new PericulosidadeCommand() );
	}

	public List<ItemSalario> computaSalario( Funcionario funcionario ) {
		List<ItemSalario> linhas = new ArrayList<ItemSalario>( commands.size() );

		for ( SalarioCommand command : commands ) {
			linhas.add(command.calcula( funcionario ));
		}

		return linhas;
	}
	
}